import request from "../utils/request";

const prefix="/blog-service/blog"

export function addBlog(blog){
    return request({
        url: prefix+"/add",
        method: 'post',
        data:blog
    })
}

export function deleteBlog(id){
    return request({
        url: prefix.concat("/delete/",id),
        method: 'post',
    })
}

export function listBlog(id){
    return request({
        url:prefix.concat("/list/",id),
        method:'get'
    })
}
export function pageBlog(param){
    return request({
        url:prefix.concat("/page"),
        method:'post',
        data:param

    })
}

export function detailBlog(id){
    return request({
        url:prefix.concat("/detail/",id),
        method:'get'
    })
}
